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

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

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: A = None
        self.u: E = None
        self.r: A = None
        self.o: B = None
        self.v: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: D = None
        self.x: E = None
        self.r: C = None
        self.z: G = None
        self.y: E = None
        self.v: C = None
        self.txt = txt

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

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

l.y = a
l.r = m
f.r = e
a.u = l
m.s = l
m.r = l
m.u = d
m.o = f
m.v = e
e.r = d
e.z = l
e.t = m
e.q = a
e.o = f
e.u = f
e.v = g
c.s = m
c.x = d
c.y = d
c.r = a
c.v = a
c.z = g
g.t = d
g.o = e
d.r = e
d.z = l
d.t = m
d.q = a
d.o = f
d.u = f
d.v = g
assert e.v.t.q.u.r.r.y.txt == "
class A:
    def __init__(self, txt: str):
        self.y: C = None
        self.r: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: A = None
        self.u: E = None
        self.r: A = None
        self.o: B = None
        self.v: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: D = None
        self.x: E = None
        self.r: C = None
        self.z: G = None
        self.y: E = None
        self.v: C = None
        self.txt = txt

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

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

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