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

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: G = None
        self.txt = txt

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

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

k = A("k")
l = B("l")
a = C("a")
n = D("n")
g = E("g")
m = F("m")
b = G("b")
d = F("d")
c = B("c")
h = G("h")

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: G = None
        self.txt = txt

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

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

k = A("k")
l = B("l")
a = C("a")
n = D("n")
g = E("g")
m = F("m")
b = G("b")
d = F("d")
c = B("c")
h = G("h")

k.y = l
k.t = a
k.o = c
l.v = b
l.r = c
l.y = g
a.o = n
a.x = n
a.t = g
n.t = l
n.s = k
n.x = k
n.o = d
n.v = b
n.w = g
n.z = m
g.p = h
m.q = b
m.s = k
b.z = h
b.w = a
b.p = k
b.q = n
b.x = l
d.q = h
d.s = k
c.v = b
c.r = l
c.y = g
h.z = b
h.w = a
h.p = k
h.q = n
h.x = c
assert d.s.o.v.txt == "b"