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

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

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.x: D = None
        self.s: A = None
        self.p: A = None
        self.o: G = None
        self.r: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: A = None
        self.x: E = None
        self.t: B = None
        self.w: A = None
        self.txt = txt

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

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

l = A("l")
n = B("n")
f = C("f")
i = D("i")
c = E("c")
b = F("b")
d = G("d")
k = F("k")
h = E("h")

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

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

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.x: D = None
        self.s: A = None
        self.p: A = None
        self.o: G = None
        self.r: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: A = None
        self.x: E = None
        self.t: B = None
        self.w: A = None
        self.txt = txt

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

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

l = A("l")
n = B("n")
f = C("f")
i = D("i")
c = E("c")
b = F("b")
d = G("d")
k = F("k")
h = E("h")

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