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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.u: F = None
        self.q: D = None
        self.x: B = None
        self.r: G = None
        self.t: A = None
        self.y: C = None
        self.z: F = None
        self.txt = txt

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

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.u: F = None
        self.q: D = None
        self.x: B = None
        self.r: G = None
        self.t: A = None
        self.y: C = None
        self.z: F = None
        self.txt = txt

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

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

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