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

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

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: A = None
        self.t: A = None
        self.u: A = None
        self.v: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.u: A = None
        self.q: C = None
        self.z: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: A = None
        self.t: A = None
        self.u: A = None
        self.v: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.u: A = None
        self.q: C = None
        self.z: D = None
        self.txt = txt

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

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