class A:
    def __init__(self, txt: str):
        self.t: F = None
        self.p: G = None
        self.w: F = None
        self.y: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: C = None
        self.o: A = None
        self.p: A = None
        self.u: C = None
        self.t: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.v: E = None
        self.r: A = None
        self.z: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.y: F = None
        self.p: G = None
        self.r: B = None
        self.z: F = None
        self.o: C = None
        self.s: A = None
        self.t: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.q: G = None
        self.v: E = None
        self.r: G = None
        self.z: D = None
        self.o: H = None
        self.x: A = None
        self.t: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.u: D = None
        self.t: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: D = None
        self.s: F = None
        self.u: H = None
        self.w: F = None
        self.t: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: B = None
        self.txt = txt

j = A("j")
b = B("b")
k = C("k")
i = D("i")
g = E("g")
f = F("f")
c = G("c")
m = H("m")
e = E("e")

j.t = f
j.w = f
j.p = c
j.y = g
b.y = k
b.u = k
b.o = j
b.p = j
b.t = f
k.u = f
k.v = e
k.r = j
k.z = c
i.x = g
i.y = f
i.z = f
i.t = f
i.p = c
i.r = b
i.o = k
i.s = j
g.p = k
g.q = c
g.r = c
g.v = e
g.z = i
g.o = m
g.t = m
g.x = j
f.v = g
f.u = i
f.t = i
c.r = i
c.s = f
c.w = f
c.u = m
c.t = m
m.w = b
e.p = k
e.q = c
e.r = c
e.v = g
e.z = i
e.o = m
e.t = m
e.x = j
assert e.r.r.s.y.v.o.w.u.txt == "
class A:
    def __init__(self, txt: str):
        self.t: F = None
        self.p: G = None
        self.w: F = None
        self.y: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: C = None
        self.o: A = None
        self.p: A = None
        self.u: C = None
        self.t: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.v: E = None
        self.r: A = None
        self.z: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.y: F = None
        self.p: G = None
        self.r: B = None
        self.z: F = None
        self.o: C = None
        self.s: A = None
        self.t: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.q: G = None
        self.v: E = None
        self.r: G = None
        self.z: D = None
        self.o: H = None
        self.x: A = None
        self.t: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.u: D = None
        self.t: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: D = None
        self.s: F = None
        self.u: H = None
        self.w: F = None
        self.t: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: B = None
        self.txt = txt

j = A("j")
b = B("b")
k = C("k")
i = D("i")
g = E("g")
f = F("f")
c = G("c")
m = H("m")
e = E("e")

j.t = f
j.w = f
j.p = c
j.y = g
b.y = k
b.u = k
b.o = j
b.p = j
b.t = f
k.u = f
k.v = e
k.r = j
k.z = c
i.x = g
i.y = f
i.z = f
i.t = f
i.p = c
i.r = b
i.o = k
i.s = j
g.p = k
g.q = c
g.r = c
g.v = e
g.z = i
g.o = m
g.t = m
g.x = j
f.v = g
f.u = i
f.t = i
c.r = i
c.s = f
c.w = f
c.u = m
c.t = m
m.w = b
e.p = k
e.q = c
e.r = c
e.v = g
e.z = i
e.o = m
e.t = m
e.x = j
assert e.r.r.s.y.v.o.w.u.txt == "k"