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

class B:
    def __init__(self, txt: str):
        self.z: G = None
        self.x: G = None
        self.y: F = None
        self.u: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.x: F = None
        self.v: A = None
        self.o: F = None
        self.q: G = None
        self.t: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.t: H = None
        self.z: H = None
        self.s: D = None
        self.w: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: D = None
        self.q: H = None
        self.s: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: G = None
        self.x: G = None
        self.y: F = None
        self.u: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.x: F = None
        self.v: A = None
        self.o: F = None
        self.q: G = None
        self.t: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.t: H = None
        self.z: H = None
        self.s: D = None
        self.w: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: D = None
        self.q: H = None
        self.s: C = None
        self.txt = txt

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

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