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

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.y: C = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.q: A = None
        self.r: E = None
        self.s: A = None
        self.x: C = None
        self.u: A = None
        self.w: A = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.y: C = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.q: A = None
        self.r: E = None
        self.s: A = None
        self.x: C = None
        self.u: A = None
        self.w: A = None
        self.txt = txt

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

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

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