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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.p: B = None
        self.w: A = None
        self.u: G = None
        self.t: C = None
        self.y: D = None
        self.r: B = None
        self.txt = txt

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

a.q = c
m.t = e
f.y = b
f.u = g
l.y = m
l.q = f
e.r = l
e.o = a
c.x = l
c.u = j
c.r = e
c.t = f
g.p = m
g.r = m
g.w = a
g.u = j
g.t = i
g.y = b
j.p = m
j.r = m
j.w = a
j.u = g
j.t = f
j.y = l
b.y = m
b.q = f
i.y = l
i.u = j
assert c.u.t.y.q.y.y.txt == "
class A:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.p: B = None
        self.w: A = None
        self.u: G = None
        self.t: C = None
        self.y: D = None
        self.r: B = None
        self.txt = txt

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

a.q = c
m.t = e
f.y = b
f.u = g
l.y = m
l.q = f
e.r = l
e.o = a
c.x = l
c.u = j
c.r = e
c.t = f
g.p = m
g.r = m
g.w = a
g.u = j
g.t = i
g.y = b
j.p = m
j.r = m
j.w = a
j.u = g
j.t = f
j.y = l
b.y = m
b.q = f
i.y = l
i.u = j
assert c.u.t.y.q.y.y.txt == "m"