class A:
    def __init__(self, txt: str):
        self.t: B = None
        self.q: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: F = None
        self.x: A = None
        self.t: C = None
        self.w: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: C = None
        self.z: F = None
        self.t: F = None
        self.q: G = None
        self.x: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: G = None
        self.o: D = None
        self.u: F = None
        self.s: F = None
        self.v: F = None
        self.y: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.r: D = None
        self.w: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: B = None
        self.t: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: F = None
        self.x: A = None
        self.t: C = None
        self.w: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: C = None
        self.z: F = None
        self.t: F = None
        self.q: G = None
        self.x: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: G = None
        self.o: D = None
        self.u: F = None
        self.s: F = None
        self.v: F = None
        self.y: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.r: D = None
        self.w: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: B = None
        self.t: C = None
        self.txt = txt

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

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