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

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

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.y: A = None
        self.x: I = None
        self.w: C = None
        self.s: I = None
        self.v: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: H = None
        self.o: D = None
        self.t: A = None
        self.v: F = None
        self.p: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.y: A = None
        self.x: I = None
        self.w: C = None
        self.s: I = None
        self.v: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: H = None
        self.o: D = None
        self.t: A = None
        self.v: F = None
        self.p: D = None
        self.txt = txt

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

d.o = c
i.v = m
i.y = m
i.p = l
a.s = g
l.p = j
l.v = m
b.v = g
b.s = l
g.t = d
m.y = g
m.o = a
m.u = d
j.y = d
j.x = c
j.s = c
j.w = a
j.v = a
c.s = j
c.o = l
c.p = l
c.t = d
c.v = g
assert m.o.s.t.o.p.p.y.txt == "d"