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

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

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

class D:
    def __init__(self, txt: str):
        self.x: C = None
        self.t: B = None
        self.r: C = None
        self.z: B = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.x: C = None
        self.t: B = None
        self.r: C = None
        self.z: B = None
        self.txt = txt

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

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

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

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