class A:
    def __init__(self, txt: str):
        self.t: I = None
        self.txt = txt

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

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

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.y: E = None
        self.u: H = None
        self.o: E = None
        self.t: E = None
        self.r: E = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.y: E = None
        self.u: H = None
        self.o: E = None
        self.t: E = None
        self.r: E = None
        self.txt = txt

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

f.t = l
k.r = g
k.w = a
k.p = c
k.u = l
k.t = b
b.o = g
b.t = i
b.r = l
b.y = k
j.q = l
j.y = a
j.w = a
j.o = g
j.u = f
j.p = i
j.x = k
j.v = c
g.o = c
g.s = c
g.x = k
i.q = g
i.s = g
i.v = g
a.v = b
c.s = k
c.o = b
c.p = b
c.v = a
l.y = g
l.o = g
l.t = g
l.r = g
l.u = c
assert a.v.t.v.x.w.v.r.r.x.txt == "k"