class A:
    def __init__(self, txt: str):
        self.o: G = None
        self.s: G = None
        self.u: C = None
        self.w: B = None
        self.q: F = None
        self.t: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.q: C = None
        self.s: B = None
        self.o: G = None
        self.z: E = None
        self.t: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.q: C = None
        self.s: B = None
        self.o: G = None
        self.z: E = None
        self.t: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

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

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

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

g.o = a
g.s = a
g.u = c
g.t = c
g.w = d
g.q = j
d.v = g
d.u = a
c.o = l
c.y = j
c.t = i
c.u = a
l.w = g
l.q = c
l.s = d
l.o = a
l.z = i
l.t = i
i.q = j
j.p = l
j.s = a
a.z = d
a.x = c
assert a.x.t.q.s.z.u.x.txt == "c"