class A:
    def __init__(self, txt: str):
        self.x: F = None
        self.t: F = None
        self.u: C = None
        self.s: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: E = None
        self.y: C = None
        self.t: C = None
        self.p: A = None
        self.q: A = None
        self.w: E = None
        self.u: G = None
        self.v: F = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.o: B = None
        self.w: A = None
        self.p: C = None
        self.r: H = None
        self.q: C = None
        self.u: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: E = None
        self.y: C = None
        self.t: C = None
        self.p: A = None
        self.q: A = None
        self.w: E = None
        self.u: G = None
        self.v: F = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.o: B = None
        self.w: A = None
        self.p: C = None
        self.r: H = None
        self.q: C = None
        self.u: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

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

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