class A:
    def __init__(self, txt: str):
        self.q: E = None
        self.x: D = None
        self.p: C = None
        self.w: C = None
        self.v: C = None
        self.z: E = None
        self.y: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.r: G = None
        self.u: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.w: F = None
        self.t: G = None
        self.p: A = None
        self.v: A = None
        self.z: E = None
        self.q: E = None
        self.txt = txt

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.r: G = None
        self.u: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.w: F = None
        self.t: G = None
        self.p: A = None
        self.v: A = None
        self.z: E = None
        self.q: E = None
        self.txt = txt

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

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

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

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

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

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