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

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

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.y: A = None
        self.p: B = None
        self.r: E = None
        self.z: B = None
        self.q: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.o: A = None
        self.txt = txt

c = A("c")
e = B("e")
i = C("i")
n = D("n")
m = E("m")
b = F("b")
g = D("g")
j = E("j")

c.z = e
e.r = b
e.p = i
e.x = m
i.o = e
i.p = e
i.z = e
i.q = e
i.y = c
i.r = j
n.y = b
n.z = b
n.w = i
n.o = m
n.v = e
m.y = b
m.r = b
m.x = b
m.v = i
b.u = m
b.o = c
g.y = b
g.z = b
g.w = i
g.o = m
g.v = e
j.y = b
j.r = b
j.x = b
j.v = i
assert e.p.r.x.o.txt == "
class A:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.y: A = None
        self.p: B = None
        self.r: E = None
        self.z: B = None
        self.q: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.o: A = None
        self.txt = txt

c = A("c")
e = B("e")
i = C("i")
n = D("n")
m = E("m")
b = F("b")
g = D("g")
j = E("j")

c.z = e
e.r = b
e.p = i
e.x = m
i.o = e
i.p = e
i.z = e
i.q = e
i.y = c
i.r = j
n.y = b
n.z = b
n.w = i
n.o = m
n.v = e
m.y = b
m.r = b
m.x = b
m.v = i
b.u = m
b.o = c
g.y = b
g.z = b
g.w = i
g.o = m
g.v = e
j.y = b
j.r = b
j.x = b
j.v = i
assert e.p.r.x.o.txt == "c"