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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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