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

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.r: A = None
        self.x: B = None
        self.t: A = None
        self.q: B = None
        self.txt = txt

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

l.p = j
l.q = j
l.w = f
l.o = a
l.v = c
l.u = g
l.z = g
l.t = k
k.z = a
k.w = a
k.y = f
a.u = j
a.y = k
b.w = l
g.q = j
c.v = j
c.q = j
c.w = g
c.u = b
c.p = b
c.z = a
c.s = a
c.x = f
j.t = f
j.r = k
j.p = c
j.v = g
f.r = l
f.t = l
f.x = k
f.q = k
assert a.u.p.z.u.v.q.r.y.txt == "
class A:
    def __init__(self, txt: str):
        self.p: G = None
        self.w: H = None
        self.o: C = None
        self.v: F = None
        self.u: E = None
        self.t: B = None
        self.q: G = None
        self.z: E = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.r: A = None
        self.x: B = None
        self.t: A = None
        self.q: B = None
        self.txt = txt

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

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