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

class B:
    def __init__(self, txt: str):
        self.p: F = None
        self.w: F = None
        self.o: F = None
        self.x: D = None
        self.u: E = None
        self.q: B = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: F = None
        self.o: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: B = None
        self.v: A = None
        self.z: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.s: E = None
        self.y: A = None
        self.r: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: F = None
        self.w: F = None
        self.o: F = None
        self.x: D = None
        self.u: E = None
        self.q: B = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: F = None
        self.o: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: B = None
        self.v: A = None
        self.z: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.s: E = None
        self.y: A = None
        self.r: C = None
        self.txt = txt

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

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