class A:
    def __init__(self, txt: str):
        self.s: C = None
        self.p: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: G = None
        self.u: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: B = None
        self.o: B = None
        self.x: G = None
        self.p: C = None
        self.s: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: E = None
        self.s: H = None
        self.v: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: F = None
        self.x: E = None
        self.w: H = None
        self.r: B = None
        self.u: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: B = None
        self.o: G = None
        self.txt = txt

e = A("e")
d = B("d")
g = C("g")
l = D("l")
f = E("f")
b = F("b")
k = G("k")
c = H("c")
a = E("a")
j = F("j")

e.s = g
e.p = g
d.w = k
d.u = l
g.y = k
l.t = k
f.u = d
f.o = d
f.x = k
f.p = g
f.s = c
b.w = f
b.s = c
b.v = l
k.s = b
k.x = a
k.w = c
k.r = d
k.u = g
c.y = d
c.o = k
a.u = d
a.o = d
a.x = k
a.p = g
a.s = c
j.w = a
j.s = c
j.v = l
assert g.y.u.y.r.u.txt == "
class A:
    def __init__(self, txt: str):
        self.s: C = None
        self.p: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: G = None
        self.u: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: B = None
        self.o: B = None
        self.x: G = None
        self.p: C = None
        self.s: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: E = None
        self.s: H = None
        self.v: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: F = None
        self.x: E = None
        self.w: H = None
        self.r: B = None
        self.u: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: B = None
        self.o: G = None
        self.txt = txt

e = A("e")
d = B("d")
g = C("g")
l = D("l")
f = E("f")
b = F("b")
k = G("k")
c = H("c")
a = E("a")
j = F("j")

e.s = g
e.p = g
d.w = k
d.u = l
g.y = k
l.t = k
f.u = d
f.o = d
f.x = k
f.p = g
f.s = c
b.w = f
b.s = c
b.v = l
k.s = b
k.x = a
k.w = c
k.r = d
k.u = g
c.y = d
c.o = k
a.u = d
a.o = d
a.x = k
a.p = g
a.s = c
j.w = a
j.s = c
j.v = l
assert g.y.u.y.r.u.txt == "l"