class A:
    def __init__(self, txt: str):
        self.t: J = None
        self.o: H = None
        self.y: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: D = None
        self.x: A = None
        self.o: B = None
        self.p: H = None
        self.w: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: A = None
        self.u: J = None
        self.x: J = None
        self.r: D = None
        self.o: B = None
        self.q: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: G = None
        self.r: E = None
        self.q: B = None
        self.y: A = None
        self.t: H = None
        self.x: D = None
        self.u: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: I = None
        self.y: H = None
        self.q: C = None
        self.p: E = None
        self.x: D = None
        self.v: G = None
        self.u: H = None
        self.t: I = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: D = None
        self.x: A = None
        self.o: B = None
        self.p: H = None
        self.w: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: A = None
        self.u: J = None
        self.x: J = None
        self.r: D = None
        self.o: B = None
        self.q: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: G = None
        self.r: E = None
        self.q: B = None
        self.y: A = None
        self.t: H = None
        self.x: D = None
        self.u: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: I = None
        self.y: H = None
        self.q: C = None
        self.p: E = None
        self.x: D = None
        self.v: G = None
        self.u: H = None
        self.t: I = None
        self.txt = txt

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

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