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

class B:
    def __init__(self, txt: str):
        self.u: E = None
        self.s: E = None
        self.t: E = None
        self.y: C = None
        self.r: C = None
        self.v: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: H = None
        self.q: G = None
        self.w: D = None
        self.r: B = None
        self.p: I = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.w: A = None
        self.s: I = None
        self.z: C = None
        self.u: C = None
        self.q: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: E = None
        self.s: E = None
        self.t: E = None
        self.y: C = None
        self.r: C = None
        self.v: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: H = None
        self.q: G = None
        self.w: D = None
        self.r: B = None
        self.p: I = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.w: A = None
        self.s: I = None
        self.z: C = None
        self.u: C = None
        self.q: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

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

i.o = a
f.u = l
f.s = l
f.t = l
f.y = c
f.r = c
f.v = a
c.u = f
m.y = n
l.t = g
l.q = b
l.w = m
l.r = f
l.p = n
a.y = f
a.q = c
a.o = g
b.o = m
g.w = i
g.q = i
g.s = n
g.z = c
g.u = c
n.y = a
assert i.o.y.t.r.txt == "f"