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

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

class C:
    def __init__(self, txt: str):
        self.x: C = None
        self.u: C = None
        self.v: D = None
        self.p: F = None
        self.r: B = None
        self.w: G = None
        self.o: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.s: G = None
        self.y: D = None
        self.t: A = None
        self.q: D = None
        self.o: C = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: C = None
        self.u: C = None
        self.v: D = None
        self.p: F = None
        self.r: B = None
        self.w: G = None
        self.o: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.s: G = None
        self.y: D = None
        self.t: A = None
        self.q: D = None
        self.o: C = None
        self.txt = txt

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

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

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