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

class B:
    def __init__(self, txt: str):
        self.o: A = None
        self.r: F = None
        self.s: D = None
        self.t: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.y: A = None
        self.x: H = None
        self.w: E = None
        self.u: G = None
        self.z: G = None
        self.q: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.z: G = None
        self.v: G = None
        self.x: B = None
        self.y: E = None
        self.w: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: E = None
        self.v: D = None
        self.o: B = None
        self.t: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: A = None
        self.r: F = None
        self.s: D = None
        self.t: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.y: A = None
        self.x: H = None
        self.w: E = None
        self.u: G = None
        self.z: G = None
        self.q: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.z: G = None
        self.v: G = None
        self.x: B = None
        self.y: E = None
        self.w: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: E = None
        self.v: D = None
        self.o: B = None
        self.t: E = None
        self.txt = txt

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

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