class A:
    def __init__(self, txt: str):
        self.y: E = None
        self.x: E = None
        self.o: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: B = None
        self.o: C = None
        self.u: G = None
        self.t: B = None
        self.x: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.p: D = None
        self.t: A = None
        self.s: C = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.o: F = None
        self.r: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: A = None
        self.y: F = None
        self.o: D = None
        self.u: B = None
        self.s: B = None
        self.x: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: F = None
        self.r: F = None
        self.o: D = None
        self.x: B = None
        self.y: E = None
        self.z: D = None
        self.txt = txt

i = A("i")
c = B("c")
g = C("g")
e = D("e")
a = E("a")
f = F("f")
h = G("h")
n = F("n")
l = C("l")
m = B("m")

i.y = a
i.x = a
i.o = h
c.r = m
c.t = m
c.o = g
c.u = h
c.x = h
g.r = n
g.p = e
g.t = i
g.s = l
e.s = m
e.o = f
e.r = h
a.v = i
a.y = f
a.o = e
a.u = m
a.s = m
a.x = c
f.u = a
f.y = c
h.v = n
h.r = n
h.o = e
h.z = e
h.x = c
h.y = a
n.u = a
n.y = c
l.r = f
l.p = e
l.t = i
l.s = g
m.r = c
m.t = c
m.o = g
m.u = h
m.x = h
assert m.x.y.y.txt == "
class A:
    def __init__(self, txt: str):
        self.y: E = None
        self.x: E = None
        self.o: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: B = None
        self.o: C = None
        self.u: G = None
        self.t: B = None
        self.x: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.p: D = None
        self.t: A = None
        self.s: C = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.o: F = None
        self.r: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: A = None
        self.y: F = None
        self.o: D = None
        self.u: B = None
        self.s: B = None
        self.x: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: F = None
        self.r: F = None
        self.o: D = None
        self.x: B = None
        self.y: E = None
        self.z: D = None
        self.txt = txt

i = A("i")
c = B("c")
g = C("g")
e = D("e")
a = E("a")
f = F("f")
h = G("h")
n = F("n")
l = C("l")
m = B("m")

i.y = a
i.x = a
i.o = h
c.r = m
c.t = m
c.o = g
c.u = h
c.x = h
g.r = n
g.p = e
g.t = i
g.s = l
e.s = m
e.o = f
e.r = h
a.v = i
a.y = f
a.o = e
a.u = m
a.s = m
a.x = c
f.u = a
f.y = c
h.v = n
h.r = n
h.o = e
h.z = e
h.x = c
h.y = a
n.u = a
n.y = c
l.r = f
l.p = e
l.t = i
l.s = g
m.r = c
m.t = c
m.o = g
m.u = h
m.x = h
assert m.x.y.y.txt == "f"