class A:
    def __init__(self, txt: str):
        self.t: E = None
        self.s: B = None
        self.p: G = None
        self.x: D = None
        self.w: D = None
        self.q: F = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.s: E = None
        self.z: D = None
        self.t: H = None
        self.r: C = None
        self.v: H = None
        self.p: C = None
        self.y: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: A = None
        self.u: G = None
        self.z: B = None
        self.y: D = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.s: E = None
        self.z: D = None
        self.t: H = None
        self.r: C = None
        self.v: H = None
        self.p: C = None
        self.y: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: A = None
        self.u: G = None
        self.z: B = None
        self.y: D = None
        self.txt = txt

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

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