class A:
    def __init__(self, txt: str):
        self.r: D = None
        self.u: B = None
        self.s: I = None
        self.v: F = None
        self.p: I = None
        self.z: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: D = None
        self.v: C = None
        self.y: E = None
        self.z: A = None
        self.s: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: I = None
        self.t: I = None
        self.z: G = None
        self.y: A = None
        self.q: H = None
        self.r: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: C = None
        self.r: C = None
        self.o: B = None
        self.y: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.t: B = None
        self.s: I = None
        self.r: F = None
        self.y: B = None
        self.w: D = None
        self.u: F = None
        self.txt = txt

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

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

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

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

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

f.r = m
f.u = i
f.s = l
f.p = l
f.z = l
f.v = h
i.w = m
i.v = e
i.y = g
i.z = f
i.s = j
e.w = l
e.t = l
e.z = j
e.y = f
e.q = c
e.r = i
m.v = e
m.r = e
m.o = i
m.y = i
g.z = h
g.r = h
g.u = h
g.t = i
g.y = i
g.s = l
g.w = m
h.y = k
h.t = i
k.p = e
k.v = f
k.u = c
c.x = f
c.o = m
c.v = e
c.q = i
c.p = i
c.r = h
c.w = h
c.u = h
c.y = g
l.x = e
l.y = e
j.p = e
j.v = f
j.u = c
assert f.v.y.u.v.r.y.txt == "
class A:
    def __init__(self, txt: str):
        self.r: D = None
        self.u: B = None
        self.s: I = None
        self.v: F = None
        self.p: I = None
        self.z: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: D = None
        self.v: C = None
        self.y: E = None
        self.z: A = None
        self.s: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: I = None
        self.t: I = None
        self.z: G = None
        self.y: A = None
        self.q: H = None
        self.r: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: C = None
        self.r: C = None
        self.o: B = None
        self.y: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.t: B = None
        self.s: I = None
        self.r: F = None
        self.y: B = None
        self.w: D = None
        self.u: F = None
        self.txt = txt

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

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

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

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

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

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