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

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

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

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.x: F = None
        self.t: H = None
        self.y: D = None
        self.o: F = None
        self.q: C = None
        self.w: C = None
        self.u: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.y: B = None
        self.z: B = None
        self.q: G = None
        self.r: D = None
        self.txt = txt

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

f.w = i
f.r = i
f.s = g
f.u = k
b.r = d
b.w = d
b.o = f
b.q = g
b.y = l
b.t = k
b.x = i
b.v = i
d.v = i
d.s = l
e.o = b
l.v = g
l.x = g
l.o = g
l.t = j
l.y = k
l.q = d
l.w = d
l.u = f
g.x = e
g.v = l
i.s = f
c.y = b
c.z = b
c.q = i
c.r = e
k.o = b
j.y = b
j.z = b
j.q = i
j.r = e
assert j.z.y.q.v.s.txt == "
class A:
    def __init__(self, txt: str):
        self.w: G = None
        self.r: G = None
        self.s: F = None
        self.u: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.x: F = None
        self.t: H = None
        self.y: D = None
        self.o: F = None
        self.q: C = None
        self.w: C = None
        self.u: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.y: B = None
        self.z: B = None
        self.q: G = None
        self.r: D = None
        self.txt = txt

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

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