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

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.u: E = None
        self.w: B = None
        self.x: D = None
        self.y: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: C = None
        self.s: C = None
        self.z: D = None
        self.o: E = None
        self.u: D = None
        self.t: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: C = None
        self.u: B = None
        self.v: C = None
        self.p: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: C = None
        self.r: E = None
        self.v: D = None
        self.x: A = None
        self.txt = txt

g = A("g")
i = B("i")
k = C("k")
n = D("n")
d = E("d")
b = F("b")
a = B("a")
j = C("j")

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

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.u: E = None
        self.w: B = None
        self.x: D = None
        self.y: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: C = None
        self.s: C = None
        self.z: D = None
        self.o: E = None
        self.u: D = None
        self.t: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: C = None
        self.u: B = None
        self.v: C = None
        self.p: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: C = None
        self.r: E = None
        self.v: D = None
        self.x: A = None
        self.txt = txt

g = A("g")
i = B("i")
k = C("k")
n = D("n")
d = E("d")
b = F("b")
a = B("a")
j = C("j")

g.t = k
g.r = k
g.o = a
g.q = i
i.r = n
i.x = n
i.u = d
i.y = d
i.w = a
k.r = j
k.s = j
k.z = n
k.u = n
k.o = d
k.t = b
n.z = a
n.u = g
d.x = k
d.u = a
d.v = j
d.p = b
b.o = j
b.r = d
b.v = n
b.x = g
a.r = n
a.x = n
a.u = d
a.y = d
a.w = i
j.r = k
j.s = k
j.z = n
j.u = n
j.o = d
j.t = b
assert n.u.r.t.r.u.txt == "a"