class A:
    def __init__(self, txt: str):
        self.z: D = None
        self.o: G = None
        self.u: C = None
        self.y: C = None
        self.w: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: G = None
        self.v: D = None
        self.s: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: E = None
        self.v: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.u: E = None
        self.txt = txt

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

j.z = n
j.o = l
j.u = f
j.y = f
j.w = i
b.z = l
b.v = n
b.s = f
f.w = j
f.q = j
f.o = n
n.t = a
n.v = b
a.t = f
a.y = j
a.o = m
i.s = m
i.x = n
i.u = b
i.w = b
i.z = b
l.u = a
m.s = i
m.x = n
m.u = b
m.w = b
m.z = b
assert f.w.z.v.z.u.o.s.u.txt == "
class A:
    def __init__(self, txt: str):
        self.z: D = None
        self.o: G = None
        self.u: C = None
        self.y: C = None
        self.w: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: G = None
        self.v: D = None
        self.s: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: E = None
        self.v: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.u: E = None
        self.txt = txt

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

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