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

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

class C:
    def __init__(self, txt: str):
        self.x: G = None
        self.t: F = None
        self.s: E = None
        self.z: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: C = None
        self.v: C = None
        self.u: C = None
        self.z: E = None
        self.o: D = None
        self.r: D = None
        self.t: C = None
        self.txt = txt

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

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

j.u = b
j.z = h
b.s = h
b.u = h
b.z = h
b.w = m
b.o = m
b.q = f
b.t = l
h.x = f
h.t = c
h.z = c
h.s = m
l.r = m
l.o = m
l.u = f
l.s = j
l.w = j
m.u = l
m.x = b
m.t = j
m.q = h
c.w = h
c.v = h
c.u = h
c.t = h
c.z = m
c.o = l
c.r = l
f.p = h
f.u = b
f.r = c
assert b.t.w.z.s.t.z.txt == "
class A:
    def __init__(self, txt: str):
        self.u: B = None
        self.z: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: G = None
        self.t: F = None
        self.s: E = None
        self.z: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: C = None
        self.v: C = None
        self.u: C = None
        self.z: E = None
        self.o: D = None
        self.r: D = None
        self.t: C = None
        self.txt = txt

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

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

j.u = b
j.z = h
b.s = h
b.u = h
b.z = h
b.w = m
b.o = m
b.q = f
b.t = l
h.x = f
h.t = c
h.z = c
h.s = m
l.r = m
l.o = m
l.u = f
l.s = j
l.w = j
m.u = l
m.x = b
m.t = j
m.q = h
c.w = h
c.v = h
c.u = h
c.t = h
c.z = m
c.o = l
c.r = l
f.p = h
f.u = b
f.r = c
assert b.t.w.z.s.t.z.txt == "h"