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

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

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

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.u: G = None
        self.q: E = None
        self.w: G = None
        self.x: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: H = None
        self.y: A = None
        self.o: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: D = None
        self.t: C = None
        self.v: D = None
        self.q: C = None
        self.w: F = None
        self.p: D = None
        self.x: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: C = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.u: G = None
        self.q: E = None
        self.w: G = None
        self.x: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: H = None
        self.y: A = None
        self.o: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: D = None
        self.t: C = None
        self.v: D = None
        self.q: C = None
        self.w: F = None
        self.p: D = None
        self.x: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: C = None
        self.txt = txt

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

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