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

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.u: A = None
        self.p: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: F = None
        self.t: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: B = None
        self.p: E = None
        self.q: G = None
        self.o: E = None
        self.u: A = None
        self.v: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: E = None
        self.y: C = None
        self.r: C = None
        self.p: E = None
        self.o: D = None
        self.u: B = None
        self.z: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.u: A = None
        self.p: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: F = None
        self.t: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: B = None
        self.p: E = None
        self.q: G = None
        self.o: E = None
        self.u: A = None
        self.v: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: E = None
        self.y: C = None
        self.r: C = None
        self.p: E = None
        self.o: D = None
        self.u: B = None
        self.z: F = None
        self.txt = txt

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

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