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

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

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.q: G = None
        self.w: F = None
        self.z: B = None
        self.p: F = None
        self.txt = txt

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

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

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

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.q: G = None
        self.w: F = None
        self.z: B = None
        self.p: F = None
        self.txt = txt

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

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