class A:
    def __init__(self, txt: str):
        self.u: F = None
        self.x: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.s: I = None
        self.r: G = None
        self.u: C = None
        self.x: C = None
        self.p: G = None
        self.t: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.w: D = None
        self.q: C = None
        self.r: E = None
        self.u: H = None
        self.o: D = None
        self.x: G = None
        self.p: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: I = None
        self.txt = txt

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

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

a = A("a")
b = B("b")
n = C("n")
f = D("f")
k = E("k")
e = F("e")
m = G("m")
i = H("i")
c = I("c")

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

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

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

class D:
    def __init__(self, txt: str):
        self.s: I = None
        self.r: G = None
        self.u: C = None
        self.x: C = None
        self.p: G = None
        self.t: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.w: D = None
        self.q: C = None
        self.r: E = None
        self.u: H = None
        self.o: D = None
        self.x: G = None
        self.p: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: I = None
        self.txt = txt

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

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

a = A("a")
b = B("b")
n = C("n")
f = D("f")
k = E("k")
e = F("e")
m = G("m")
i = H("i")
c = I("c")

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