class A:
    def __init__(self, txt: str):
        self.s: D = None
        self.q: F = None
        self.r: D = None
        self.v: E = None
        self.x: F = None
        self.z: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: B = 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.u: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: E = None
        self.r: E = None
        self.w: C = None
        self.o: E = None
        self.t: E = None
        self.s: H = None
        self.y: B = None
        self.p: B = None
        self.txt = txt

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

h = A("h")
a = B("a")
n = C("n")
b = D("b")
j = E("j")
g = F("g")
e = G("e")
k = H("k")

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

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

class C:
    def __init__(self, txt: str):
        self.t: B = 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.u: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: E = None
        self.r: E = None
        self.w: C = None
        self.o: E = None
        self.t: E = None
        self.s: H = None
        self.y: B = None
        self.p: B = None
        self.txt = txt

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

h = A("h")
a = B("a")
n = C("n")
b = D("b")
j = E("j")
g = F("g")
e = G("e")
k = H("k")

h.s = b
h.r = b
h.q = g
h.x = g
h.v = j
h.z = a
a.x = b
a.w = j
n.t = a
b.w = n
j.u = a
g.v = b
g.r = n
e.x = j
e.r = j
e.o = j
e.t = j
e.w = n
e.s = k
e.y = a
e.p = a
k.x = b
k.p = b
k.o = b
k.u = n
k.y = n
k.t = j
k.v = j
assert a.x.w.t.w.u.x.txt == "b"