class A:
    def __init__(self, txt: str):
        self.x: F = None
        self.p: F = None
        self.q: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.x: H = None
        self.p: G = None
        self.z: B = None
        self.u: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.y: H = None
        self.txt = txt

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

f = A("f")
n = B("n")
b = C("b")
e = D("e")
h = E("h")
l = F("l")
j = G("j")
g = H("g")
i = G("i")

f.x = l
f.p = l
f.q = n
n.s = l
n.u = f
n.p = b
n.x = b
n.v = h
n.o = e
b.u = g
b.p = l
e.q = b
e.x = g
e.p = i
e.z = n
e.u = f
h.v = n
h.x = n
h.s = l
h.w = i
h.z = f
l.y = i
l.z = i
l.t = b
l.w = g
j.y = g
g.t = l
g.y = f
g.x = b
g.o = j
i.y = g
assert j.y.o.y.x.u.o.y.y.txt == "
class A:
    def __init__(self, txt: str):
        self.x: F = None
        self.p: F = None
        self.q: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.x: H = None
        self.p: G = None
        self.z: B = None
        self.u: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.y: H = None
        self.txt = txt

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

f = A("f")
n = B("n")
b = C("b")
e = D("e")
h = E("h")
l = F("l")
j = G("j")
g = H("g")
i = G("i")

f.x = l
f.p = l
f.q = n
n.s = l
n.u = f
n.p = b
n.x = b
n.v = h
n.o = e
b.u = g
b.p = l
e.q = b
e.x = g
e.p = i
e.z = n
e.u = f
h.v = n
h.x = n
h.s = l
h.w = i
h.z = f
l.y = i
l.z = i
l.t = b
l.w = g
j.y = g
g.t = l
g.y = f
g.x = b
g.o = j
i.y = g
assert j.y.o.y.x.u.o.y.y.txt == "f"