class A:
    def __init__(self, txt: str):
        self.t: D = None
        self.u: E = None
        self.y: H = None
        self.o: H = None
        self.p: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: G = None
        self.z: A = None
        self.s: H = None
        self.u: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: F = None
        self.r: H = None
        self.z: H = None
        self.txt = txt

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

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

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

l.t = b
l.u = g
l.p = g
l.y = f
l.o = f
i.u = g
i.z = a
i.x = n
i.r = n
i.v = n
i.w = n
i.s = l
i.q = b
i.p = h
j.u = g
b.w = a
g.r = n
g.z = l
g.s = f
g.u = d
d.o = j
d.u = h
d.s = n
n.y = d
n.r = f
n.z = f
f.t = h
a.v = h
a.o = l
h.t = b
h.u = g
h.p = g
h.y = f
h.o = f
assert j.u.r.z.txt == "
class A:
    def __init__(self, txt: str):
        self.t: D = None
        self.u: E = None
        self.y: H = None
        self.o: H = None
        self.p: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: G = None
        self.z: A = None
        self.s: H = None
        self.u: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: F = None
        self.r: H = None
        self.z: H = None
        self.txt = txt

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

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

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

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