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

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

class C:
    def __init__(self, txt: str):
        self.x: E = None
        self.y: E = None
        self.u: G = None
        self.t: G = None
        self.q: G = None
        self.z: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: G = None
        self.x: C = None
        self.o: E = None
        self.u: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: D = None
        self.v: D = None
        self.z: D = None
        self.q: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: E = None
        self.y: E = None
        self.u: G = None
        self.t: G = None
        self.q: G = None
        self.z: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: G = None
        self.x: C = None
        self.o: E = None
        self.u: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: D = None
        self.v: D = None
        self.z: D = None
        self.q: B = None
        self.txt = txt

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

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