class A:
    def __init__(self, txt: str):
        self.o: E = None
        self.r: A = None
        self.t: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.o: D = None
        self.q: D = None
        self.v: F = None
        self.u: E = None
        self.txt = txt

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

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

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

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

k = A("k")
c = B("c")
b = C("b")
l = D("l")
h = E("h")
i = F("i")
g = G("g")
e = E("e")
f = G("f")
d = A("d")

k.o = e
k.r = d
k.t = f
c.y = i
b.s = c
b.o = l
b.q = l
b.v = i
b.u = h
l.q = b
l.r = b
l.p = d
l.v = i
l.y = f
h.s = f
h.p = f
i.s = l
i.o = g
i.x = c
g.o = i
g.r = c
g.u = f
e.s = g
e.p = f
f.o = i
f.r = c
f.u = g
d.o = h
d.r = k
d.t = f
assert l.q.s.y.txt == "
class A:
    def __init__(self, txt: str):
        self.o: E = None
        self.r: A = None
        self.t: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.o: D = None
        self.q: D = None
        self.v: F = None
        self.u: E = None
        self.txt = txt

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

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

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

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

k = A("k")
c = B("c")
b = C("b")
l = D("l")
h = E("h")
i = F("i")
g = G("g")
e = E("e")
f = G("f")
d = A("d")

k.o = e
k.r = d
k.t = f
c.y = i
b.s = c
b.o = l
b.q = l
b.v = i
b.u = h
l.q = b
l.r = b
l.p = d
l.v = i
l.y = f
h.s = f
h.p = f
i.s = l
i.o = g
i.x = c
g.o = i
g.r = c
g.u = f
e.s = g
e.p = f
f.o = i
f.r = c
f.u = g
d.o = h
d.r = k
d.t = f
assert l.q.s.y.txt == "i"