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

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

class C:
    def __init__(self, txt: str):
        self.o: F = None
        self.p: G = None
        self.z: B = None
        self.x: G = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.p: C = None
        self.o: G = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: F = None
        self.p: G = None
        self.z: B = None
        self.x: G = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.p: C = None
        self.o: G = None
        self.txt = txt

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

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