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

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

class C:
    def __init__(self, txt: str):
        self.y: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: F = None
        self.u: F = None
        self.w: H = None
        self.x: F = None
        self.z: D = None
        self.v: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: F = None
        self.p: A = None
        self.s: E = None
        self.x: G = None
        self.z: A = None
        self.u: B = None
        self.v: H = None
        self.t: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: F = None
        self.u: F = None
        self.w: H = None
        self.x: F = None
        self.z: D = None
        self.v: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: F = None
        self.p: A = None
        self.s: E = None
        self.x: G = None
        self.z: A = None
        self.u: B = None
        self.v: H = None
        self.t: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

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

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