class A:
    def __init__(self, txt: str):
        self.u: D = None
        self.w: E = None
        self.z: F = None
        self.v: F = None
        self.p: C = None
        self.y: F = None
        self.t: F = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: A = None
        self.y: G = None
        self.z: G = None
        self.s: D = None
        self.p: G = None
        self.v: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: A = None
        self.v: E = None
        self.r: D = None
        self.y: D = None
        self.w: A = None
        self.x: G = None
        self.z: B = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: A = None
        self.y: G = None
        self.z: G = None
        self.s: D = None
        self.p: G = None
        self.v: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: A = None
        self.v: E = None
        self.r: D = None
        self.y: D = None
        self.w: A = None
        self.x: G = None
        self.z: B = None
        self.txt = txt

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

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