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

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

class C:
    def __init__(self, txt: str):
        self.x: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.v: A = None
        self.w: B = None
        self.u: E = None
        self.y: E = None
        self.x: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: G = None
        self.w: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: C = None
        self.o: C = None
        self.y: C = None
        self.x: C = None
        self.t: E = None
        self.s: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.v: A = None
        self.w: B = None
        self.u: E = None
        self.y: E = None
        self.x: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: G = None
        self.w: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: C = None
        self.o: C = None
        self.y: C = None
        self.x: C = None
        self.t: E = None
        self.s: A = None
        self.txt = txt

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

e.t = d
e.y = f
e.q = f
e.s = i
j.t = g
j.p = e
j.u = k
d.x = l
k.s = d
k.v = e
k.w = j
k.x = j
k.u = g
k.y = g
g.s = k
g.p = d
l.u = i
l.w = d
i.v = d
i.o = d
i.y = d
i.x = d
i.t = g
i.s = e
f.v = d
f.o = d
f.y = d
f.x = d
f.t = g
f.s = e
assert i.s.y.t.s.w.u.v.s.txt == "i"