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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: E = None
        self.txt = txt

c = A("c")
a = B("a")
i = C("i")
l = D("l")
m = E("m")
f = F("f")
e = F("e")
j = F("j")
h = A("h")
g = D("g")

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: E = None
        self.txt = txt

c = A("c")
a = B("a")
i = C("i")
l = D("l")
m = E("m")
f = F("f")
e = F("e")
j = F("j")
h = A("h")
g = D("g")

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