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

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

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

class D:
    def __init__(self, txt: str):
        self.w: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: B = None
        self.s: G = None
        self.x: G = None
        self.q: G = None
        self.v: D = None
        self.r: C = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.w: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: B = None
        self.s: G = None
        self.x: G = None
        self.q: G = None
        self.v: D = None
        self.r: C = None
        self.txt = txt

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

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

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

f.r = d
f.s = e
g.s = l
d.u = a
n.w = k
k.t = a
k.s = l
k.x = l
k.q = l
k.v = n
k.r = d
j.y = d
j.s = n
j.v = a
l.o = n
l.q = j
l.t = a
a.s = l
m.r = d
m.s = k
e.t = g
e.s = l
e.x = l
e.q = l
e.v = n
e.r = d
assert d.u.s.t.s.q.s.txt == "n"