class A:
    def __init__(self, txt: str):
        self.p: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.s: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.y: G = None
        self.s: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: J = None
        self.y: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: C = None
        self.q: C = None
        self.v: C = None
        self.u: A = None
        self.t: D = None
        self.o: J = None
        self.p: B = None
        self.r: D = None
        self.w: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: E = None
        self.q: A = None
        self.o: D = None
        self.z: A = None
        self.w: D = None
        self.v: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: B = None
        self.s: A = None
        self.o: A = None
        self.p: F = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.s: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.y: G = None
        self.s: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: J = None
        self.y: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: C = None
        self.q: C = None
        self.v: C = None
        self.u: A = None
        self.t: D = None
        self.o: J = None
        self.p: B = None
        self.r: D = None
        self.w: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: E = None
        self.q: A = None
        self.o: D = None
        self.z: A = None
        self.w: D = None
        self.v: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: B = None
        self.s: A = None
        self.o: A = None
        self.p: F = None
        self.txt = txt

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

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