class A:
    def __init__(self, txt: str):
        self.o: F = None
        self.q: E = None
        self.r: G = None
        self.w: E = None
        self.z: G = None
        self.u: F = None
        self.p: C = None
        self.txt = txt

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.s: A = None
        self.u: F = None
        self.t: A = None
        self.r: E = None
        self.w: C = None
        self.txt = txt

i = A("i")
j = B("j")
m = C("m")
k = D("k")
a = E("a")
h = F("h")
f = G("f")
d = D("d")
b = E("b")

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.s: A = None
        self.u: F = None
        self.t: A = None
        self.r: E = None
        self.w: C = None
        self.txt = txt

i = A("i")
j = B("j")
m = C("m")
k = D("k")
a = E("a")
h = F("h")
f = G("f")
d = D("d")
b = E("b")

i.o = h
i.u = h
i.q = a
i.w = a
i.r = f
i.z = f
i.p = m
j.s = f
j.z = f
j.p = m
m.o = h
k.o = d
a.w = i
a.v = h
a.r = f
a.y = b
a.p = j
h.y = f
h.z = f
h.r = i
f.s = i
f.t = i
f.u = h
f.r = a
f.w = m
d.o = k
b.w = i
b.v = h
b.r = f
b.y = a
b.p = j
assert j.z.u.r.o.z.txt == "f"