class A:
    def __init__(self, txt: str):
        self.o: I = None
        self.p: J = None
        self.z: B = None
        self.r: E = None
        self.u: E = None
        self.q: J = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: J = None
        self.u: D = None
        self.z: A = None
        self.t: E = None
        self.p: F = None
        self.o: J = None
        self.x: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.v: H = None
        self.x: E = None
        self.w: I = None
        self.p: C = None
        self.q: C = None
        self.y: A = None
        self.o: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: G = None
        self.q: I = None
        self.v: J = None
        self.u: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: H = None
        self.z: C = None
        self.w: C = None
        self.p: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

c = A("c")
k = B("k")
g = C("g")
a = D("a")
l = E("l")
f = F("f")
m = G("m")
h = H("h")
d = I("d")
e = J("e")

c.o = d
c.p = e
c.q = e
c.z = k
c.r = l
c.u = l
k.o = a
k.u = l
g.q = e
g.o = e
g.u = a
g.z = c
g.t = l
g.p = f
g.x = f
a.t = c
l.v = f
f.v = h
f.x = l
f.w = d
f.o = d
f.p = g
f.q = g
f.y = c
m.q = g
h.z = m
h.q = d
h.v = e
h.u = c
d.x = h
d.p = h
d.z = g
d.w = g
e.x = l
assert d.w.u.t.txt == "
class A:
    def __init__(self, txt: str):
        self.o: I = None
        self.p: J = None
        self.z: B = None
        self.r: E = None
        self.u: E = None
        self.q: J = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: J = None
        self.u: D = None
        self.z: A = None
        self.t: E = None
        self.p: F = None
        self.o: J = None
        self.x: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.v: H = None
        self.x: E = None
        self.w: I = None
        self.p: C = None
        self.q: C = None
        self.y: A = None
        self.o: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: G = None
        self.q: I = None
        self.v: J = None
        self.u: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: H = None
        self.z: C = None
        self.w: C = None
        self.p: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

c = A("c")
k = B("k")
g = C("g")
a = D("a")
l = E("l")
f = F("f")
m = G("m")
h = H("h")
d = I("d")
e = J("e")

c.o = d
c.p = e
c.q = e
c.z = k
c.r = l
c.u = l
k.o = a
k.u = l
g.q = e
g.o = e
g.u = a
g.z = c
g.t = l
g.p = f
g.x = f
a.t = c
l.v = f
f.v = h
f.x = l
f.w = d
f.o = d
f.p = g
f.q = g
f.y = c
m.q = g
h.z = m
h.q = d
h.v = e
h.u = c
d.x = h
d.p = h
d.z = g
d.w = g
e.x = l
assert d.w.u.t.txt == "c"