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

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

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.o: F = None
        self.x: A = None
        self.u: G = None
        self.p: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: F = None
        self.t: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.o: F = None
        self.x: A = None
        self.u: G = None
        self.p: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: F = None
        self.t: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

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

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

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

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