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

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.x: F = None
        self.t: F = None
        self.o: A = None
        self.txt = txt

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

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

g.s = d
g.v = d
g.y = e
c.y = j
c.u = g
c.s = d
c.p = f
d.v = g
d.z = e
d.y = e
d.q = m
d.p = c
d.w = j
j.r = n
j.o = e
j.v = c
j.x = f
j.t = d
n.p = j
n.x = e
n.t = e
n.o = f
e.q = j
e.w = g
m.s = d
m.v = d
m.y = e
f.s = d
f.v = d
f.y = e
assert c.s.z.q.txt == "
class A:
    def __init__(self, txt: str):
        self.s: C = None
        self.y: F = None
        self.v: C = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.x: F = None
        self.t: F = None
        self.o: A = None
        self.txt = txt

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

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

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