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

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

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.t: E = None
        self.q: C = None
        self.y: A = None
        self.u: D = None
        self.z: C = None
        self.txt = txt

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

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

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

d = A("d")
i = B("i")
f = C("f")
c = D("c")
j = E("j")
h = F("h")
n = C("n")

d.u = c
d.x = j
d.s = i
d.v = f
d.z = f
i.z = j
i.w = d
i.x = d
i.o = h
i.y = h
f.o = d
f.y = d
f.t = j
f.q = n
f.z = n
f.u = c
c.u = n
c.r = j
c.o = i
j.o = i
h.t = n
h.z = j
h.p = d
n.o = d
n.y = d
n.t = j
n.q = f
n.z = f
n.u = c
assert i.y.p.s.txt == "
class A:
    def __init__(self, txt: str):
        self.u: D = None
        self.x: E = None
        self.s: B = None
        self.v: C = None
        self.z: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.t: E = None
        self.q: C = None
        self.y: A = None
        self.u: D = None
        self.z: C = None
        self.txt = txt

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

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

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

d = A("d")
i = B("i")
f = C("f")
c = D("c")
j = E("j")
h = F("h")
n = C("n")

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