class A:
    def __init__(self, txt: str):
        self.p: B = None
        self.z: B = None
        self.o: C = None
        self.y: C = None
        self.x: G = None
        self.t: B = None
        self.v: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.u: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.z: E = None
        self.s: H = None
        self.v: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: F = None
        self.w: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.u: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.z: E = None
        self.s: H = None
        self.v: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: F = None
        self.w: C = None
        self.txt = txt

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

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