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

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

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.x: F = None
        self.p: B = None
        self.t: D = None
        self.q: E = None
        self.w: H = None
        self.s: G = None
        self.z: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: E = None
        self.t: E = None
        self.p: D = None
        self.x: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: C = None
        self.t: F = None
        self.u: C = None
        self.y: B = None
        self.z: D = None
        self.s: B = None
        self.q: E = None
        self.p: E = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.x: F = None
        self.p: B = None
        self.t: D = None
        self.q: E = None
        self.w: H = None
        self.s: G = None
        self.z: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: E = None
        self.t: E = None
        self.p: D = None
        self.x: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: C = None
        self.t: F = None
        self.u: C = None
        self.y: B = None
        self.z: D = None
        self.s: B = None
        self.q: E = None
        self.p: E = None
        self.txt = txt

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

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