class A:
    def __init__(self, txt: str):
        self.u: H = None
        self.x: E = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: D = None
        self.v: D = None
        self.p: F = None
        self.txt = txt

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

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

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

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

l.u = c
l.x = h
j.q = a
f.y = b
f.z = h
d.o = l
d.z = j
d.p = b
d.y = b
d.t = m
d.q = c
d.r = n
d.u = f
h.z = d
h.v = d
h.p = a
a.t = b
a.u = b
a.q = c
a.z = l
a.x = l
a.v = d
b.r = j
c.r = n
c.p = b
c.t = h
m.t = b
m.u = b
m.q = c
m.z = l
m.x = l
m.v = d
n.q = a
assert d.z.q.v.o.x.p.t.txt == "
class A:
    def __init__(self, txt: str):
        self.u: H = None
        self.x: E = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: D = None
        self.v: D = None
        self.p: F = None
        self.txt = txt

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

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

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

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

l.u = c
l.x = h
j.q = a
f.y = b
f.z = h
d.o = l
d.z = j
d.p = b
d.y = b
d.t = m
d.q = c
d.r = n
d.u = f
h.z = d
h.v = d
h.p = a
a.t = b
a.u = b
a.q = c
a.z = l
a.x = l
a.v = d
b.r = j
c.r = n
c.p = b
c.t = h
m.t = b
m.u = b
m.q = c
m.z = l
m.x = l
m.v = d
n.q = a
assert d.z.q.v.o.x.p.t.txt == "b"