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

class B:
    def __init__(self, txt: str):
        self.z: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.s: G = None
        self.q: A = None
        self.u: E = None
        self.v: E = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.s: B = None
        self.t: B = None
        self.p: E = None
        self.v: E = None
        self.w: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.s: G = None
        self.q: A = None
        self.u: E = None
        self.v: E = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.s: B = None
        self.t: B = None
        self.p: E = None
        self.v: E = None
        self.w: G = None
        self.txt = txt

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

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