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

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: D = None
        self.o: A = None
        self.w: B = None
        self.r: F = None
        self.z: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: C = None
        self.v: E = None
        self.u: C = None
        self.x: A = None
        self.q: C = None
        self.w: A = None
        self.r: A = None
        self.t: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: G = None
        self.txt = txt

g = A("g")
j = B("j")
n = C("n")
m = D("m")
e = E("e")
i = F("i")
f = G("f")
k = H("k")
c = B("c")

g.r = e
g.y = i
g.x = f
j.u = e
j.o = f
j.s = i
j.t = i
n.w = j
m.q = e
m.r = c
e.u = m
e.o = g
e.w = j
e.r = i
e.z = i
i.t = g
f.s = n
f.u = n
f.q = n
f.t = n
f.v = e
f.x = g
f.w = g
f.r = g
k.v = f
c.u = e
c.o = f
c.s = i
c.t = i
assert c.u.u.q.u.r.u.r.t.txt == "
class A:
    def __init__(self, txt: str):
        self.r: E = None
        self.y: F = None
        self.x: G = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: D = None
        self.o: A = None
        self.w: B = None
        self.r: F = None
        self.z: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: C = None
        self.v: E = None
        self.u: C = None
        self.x: A = None
        self.q: C = None
        self.w: A = None
        self.r: A = None
        self.t: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: G = None
        self.txt = txt

g = A("g")
j = B("j")
n = C("n")
m = D("m")
e = E("e")
i = F("i")
f = G("f")
k = H("k")
c = B("c")

g.r = e
g.y = i
g.x = f
j.u = e
j.o = f
j.s = i
j.t = i
n.w = j
m.q = e
m.r = c
e.u = m
e.o = g
e.w = j
e.r = i
e.z = i
i.t = g
f.s = n
f.u = n
f.q = n
f.t = n
f.v = e
f.x = g
f.w = g
f.r = g
k.v = f
c.u = e
c.o = f
c.s = i
c.t = i
assert c.u.u.q.u.r.u.r.t.txt == "g"