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

class B:
    def __init__(self, txt: str):
        self.v: A = None
        self.w: I = None
        self.o: D = None
        self.x: D = None
        self.p: G = None
        self.q: I = None
        self.r: C = None
        self.s: E = None
        self.z: C = 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.o: C = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.w: C = None
        self.o: G = None
        self.z: F = None
        self.u: A = None
        self.t: B = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: A = None
        self.w: I = None
        self.o: D = None
        self.x: D = None
        self.p: G = None
        self.q: I = None
        self.r: C = None
        self.s: E = None
        self.z: C = 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.o: C = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.w: C = None
        self.o: G = None
        self.z: F = None
        self.u: A = None
        self.t: B = None
        self.txt = txt

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

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

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