class A:
    def __init__(self, txt: str):
        self.x: C = None
        self.v: C = None
        self.q: C = None
        self.t: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: F = None
        self.u: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.s: B = None
        self.v: H = None
        self.z: H = None
        self.y: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: H = None
        self.o: B = None
        self.p: D = None
        self.x: H = None
        self.w: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: B = None
        self.p: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: G = None
        self.s: G = None
        self.z: A = None
        self.q: E = None
        self.y: F = None
        self.p: E = None
        self.v: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: F = None
        self.u: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.s: B = None
        self.v: H = None
        self.z: H = None
        self.y: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: H = None
        self.o: B = None
        self.p: D = None
        self.x: H = None
        self.w: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: B = None
        self.p: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: G = None
        self.s: G = None
        self.z: A = None
        self.q: E = None
        self.y: F = None
        self.p: E = None
        self.v: D = None
        self.txt = txt

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

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