class A:
    def __init__(self, txt: str):
        self.t: D = None
        self.r: H = None
        self.x: E = None
        self.p: C = None
        self.y: I = None
        self.txt = txt

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

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.w: C = None
        self.v: D = None
        self.q: F = None
        self.p: E = None
        self.o: B = None
        self.z: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: F = None
        self.t: C = None
        self.q: G = None
        self.p: G = None
        self.r: I = None
        self.o: G = None
        self.u: F = None
        self.v: C = None
        self.z: G = None
        self.txt = txt

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

l.t = h
l.r = c
l.x = k
l.p = g
l.y = e
b.o = h
g.w = f
g.v = j
g.r = b
g.o = k
g.t = m
h.p = m
k.y = g
k.u = g
k.s = g
k.o = l
k.r = m
k.p = c
k.x = e
k.w = b
k.q = j
m.u = e
f.v = c
f.x = m
f.u = b
f.w = k
f.o = e
f.t = e
f.y = h
c.w = g
c.v = h
c.q = m
c.z = m
c.p = k
c.o = b
e.w = m
e.u = m
e.t = g
e.v = g
e.q = f
e.p = f
e.o = f
e.z = f
e.r = j
j.w = m
j.u = m
j.t = g
j.v = g
j.q = f
j.p = f
j.o = f
j.z = f
j.r = e
assert f.o.t.w.txt == "
class A:
    def __init__(self, txt: str):
        self.t: D = None
        self.r: H = None
        self.x: E = None
        self.p: C = None
        self.y: I = None
        self.txt = txt

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

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.w: C = None
        self.v: D = None
        self.q: F = None
        self.p: E = None
        self.o: B = None
        self.z: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: F = None
        self.t: C = None
        self.q: G = None
        self.p: G = None
        self.r: I = None
        self.o: G = None
        self.u: F = None
        self.v: C = None
        self.z: G = None
        self.txt = txt

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

l.t = h
l.r = c
l.x = k
l.p = g
l.y = e
b.o = h
g.w = f
g.v = j
g.r = b
g.o = k
g.t = m
h.p = m
k.y = g
k.u = g
k.s = g
k.o = l
k.r = m
k.p = c
k.x = e
k.w = b
k.q = j
m.u = e
f.v = c
f.x = m
f.u = b
f.w = k
f.o = e
f.t = e
f.y = h
c.w = g
c.v = h
c.q = m
c.z = m
c.p = k
c.o = b
e.w = m
e.u = m
e.t = g
e.v = g
e.q = f
e.p = f
e.o = f
e.z = f
e.r = j
j.w = m
j.u = m
j.t = g
j.v = g
j.q = f
j.p = f
j.o = f
j.z = f
j.r = e
assert f.o.t.w.txt == "f"