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

class B:
    def __init__(self, txt: str):
        self.q: I = None
        self.v: H = None
        self.p: A = None
        self.txt = txt

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.z: A = None
        self.w: E = None
        self.x: D = None
        self.p: F = None
        self.o: C = None
        self.t: C = None
        self.s: A = None
        self.txt = txt

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

l = A("l")
j = B("j")
a = C("a")
m = D("m")
e = E("e")
d = F("d")
f = G("f")
k = H("k")
g = I("g")

l.t = d
j.q = g
j.v = k
j.p = l
a.y = d
a.z = j
a.x = l
a.w = e
m.x = f
m.s = f
m.q = f
m.p = g
m.y = d
m.z = d
m.w = j
m.o = j
m.v = l
e.s = j
d.o = m
f.w = k
f.y = l
k.z = l
k.s = l
k.w = e
k.x = m
k.p = d
k.o = a
k.t = a
g.y = e
assert l.t.o.p.txt == "
class A:
    def __init__(self, txt: str):
        self.t: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: I = None
        self.v: H = None
        self.p: A = None
        self.txt = txt

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.z: A = None
        self.w: E = None
        self.x: D = None
        self.p: F = None
        self.o: C = None
        self.t: C = None
        self.s: A = None
        self.txt = txt

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

l = A("l")
j = B("j")
a = C("a")
m = D("m")
e = E("e")
d = F("d")
f = G("f")
k = H("k")
g = I("g")

l.t = d
j.q = g
j.v = k
j.p = l
a.y = d
a.z = j
a.x = l
a.w = e
m.x = f
m.s = f
m.q = f
m.p = g
m.y = d
m.z = d
m.w = j
m.o = j
m.v = l
e.s = j
d.o = m
f.w = k
f.y = l
k.z = l
k.s = l
k.w = e
k.x = m
k.p = d
k.o = a
k.t = a
g.y = e
assert l.t.o.p.txt == "g"