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

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

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.p: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: G = None
        self.s: E = None
        self.q: A = None
        self.r: A = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.p: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: G = None
        self.s: E = None
        self.q: A = None
        self.r: A = None
        self.txt = txt

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

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

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

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

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