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

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

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.y: D = None
        self.o: F = None
        self.w: B = None
        self.u: A = None
        self.v: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.x: C = None
        self.s: C = None
        self.o: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.s: E = None
        self.y: A = None
        self.q: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.y: D = None
        self.o: F = None
        self.w: B = None
        self.u: A = None
        self.v: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.x: C = None
        self.s: C = None
        self.o: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.s: E = None
        self.y: A = None
        self.q: C = None
        self.txt = txt

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

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