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

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

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

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

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

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

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

l.z = j
l.q = c
l.v = m
l.x = b
j.s = m
j.t = c
j.q = c
j.y = n
j.r = b
m.q = b
m.y = i
c.v = b
c.w = b
c.q = n
c.r = n
c.p = j
c.y = f
i.v = c
i.x = b
b.x = l
b.p = m
n.v = c
n.x = b
f.q = b
f.y = n
assert c.y.y.x.txt == "
class A:
    def __init__(self, txt: str):
        self.z: B = None
        self.q: D = None
        self.v: C = None
        self.x: F = None
        self.txt = txt

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

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

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

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

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

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

l.z = j
l.q = c
l.v = m
l.x = b
j.s = m
j.t = c
j.q = c
j.y = n
j.r = b
m.q = b
m.y = i
c.v = b
c.w = b
c.q = n
c.r = n
c.p = j
c.y = f
i.v = c
i.x = b
b.x = l
b.p = m
n.v = c
n.x = b
f.q = b
f.y = n
assert c.y.y.x.txt == "b"