class A:
    def __init__(self, txt: str):
        self.v: F = None
        self.o: E = None
        self.u: D = None
        self.t: C = None
        self.z: D = None
        self.q: D = None
        self.w: D = None
        self.txt = txt

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

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

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

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

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

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

h = A("h")
l = B("l")
c = C("c")
j = D("j")
n = E("n")
f = F("f")
k = G("k")

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

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

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

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

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

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

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

h = A("h")
l = B("l")
c = C("c")
j = D("j")
n = E("n")
f = F("f")
k = G("k")

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