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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.v: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: D = None
        self.txt = txt

a = A("a")
l = B("l")
k = C("k")
e = D("e")
n = E("n")
f = F("f")
i = G("i")
b = B("b")

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.v: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: D = None
        self.txt = txt

a = A("a")
l = B("l")
k = C("k")
e = D("e")
n = E("n")
f = F("f")
i = G("i")
b = B("b")

a.t = n
l.u = i
k.t = i
k.u = i
k.w = a
k.r = l
k.y = n
k.p = e
k.v = f
e.o = a
e.s = b
n.o = a
n.v = f
n.q = f
n.x = k
n.u = k
n.r = e
n.w = b
f.v = i
i.u = e
b.u = i
assert a.t.o.t.v.v.u.s.u.txt == "i"