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

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.y: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: F = None
        self.p: B = None
        self.u: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: D = None
        self.u: D = None
        self.o: D = None
        self.x: E = None
        self.w: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: B = None
        self.w: E = None
        self.v: F = None
        self.y: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.y: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: F = None
        self.p: B = None
        self.u: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: D = None
        self.u: D = None
        self.o: D = None
        self.x: E = None
        self.w: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: B = None
        self.w: E = None
        self.v: F = None
        self.y: D = None
        self.txt = txt

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

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