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

class B:
    def __init__(self, txt: str):
        self.y: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.v: H = None
        self.z: H = None
        self.w: E = None
        self.p: G = None
        self.u: G = None
        self.x: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: I = None
        self.r: H = None
        self.v: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.z: E = None
        self.x: I = None
        self.q: F = None
        self.p: B = None
        self.o: A = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.v: H = None
        self.z: H = None
        self.w: E = None
        self.p: G = None
        self.u: G = None
        self.x: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: I = None
        self.r: H = None
        self.v: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.z: E = None
        self.x: I = None
        self.q: F = None
        self.p: B = None
        self.o: A = None
        self.txt = txt

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

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

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