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

class B:
    def __init__(self, txt: str):
        self.u: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: G = None
        self.w: F = None
        self.o: F = None
        self.y: B = None
        self.p: F = None
        self.v: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

h = A("h")
c = B("c")
e = C("e")
m = D("m")
l = E("l")
a = F("a")
f = G("f")
d = F("d")
j = G("j")
k = D("k")

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

class B:
    def __init__(self, txt: str):
        self.u: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: G = None
        self.w: F = None
        self.o: F = None
        self.y: B = None
        self.p: F = None
        self.v: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

h = A("h")
c = B("c")
e = C("e")
m = D("m")
l = E("l")
a = F("a")
f = G("f")
d = F("d")
j = G("j")
k = D("k")

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