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

class B:
    def __init__(self, txt: str):
        self.q: F = None
        self.x: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.s: F = None
        self.t: G = None
        self.w: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: B = None
        self.y: D = None
        self.p: B = None
        self.x: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: C = None
        self.w: C = None
        self.v: G = None
        self.q: D = None
        self.r: G = None
        self.txt = txt

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

c = A("c")
k = B("k")
j = C("j")
m = D("m")
e = E("e")
i = F("i")
f = G("f")
l = A("l")
d = F("d")

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

class B:
    def __init__(self, txt: str):
        self.q: F = None
        self.x: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.s: F = None
        self.t: G = None
        self.w: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: B = None
        self.y: D = None
        self.p: B = None
        self.x: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: C = None
        self.w: C = None
        self.v: G = None
        self.q: D = None
        self.r: G = None
        self.txt = txt

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

c = A("c")
k = B("k")
j = C("j")
m = D("m")
e = E("e")
i = F("i")
f = G("f")
l = A("l")
d = F("d")

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