class A:
    def __init__(self, txt: str):
        self.u: G = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: C = None
        self.y: C = None
        self.p: B = None
        self.q: D = None
        self.v: B = None
        self.z: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: A = None
        self.x: B = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: C = None
        self.y: C = None
        self.p: B = None
        self.q: D = None
        self.v: B = None
        self.z: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: A = None
        self.x: B = None
        self.txt = txt

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

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